import { ItemTypeEnum, TankPartTypeEnum, TankWeaponTypeEnum, WeaponAttributeTypeEnum, EngineTypeEnum, ChassisTypeEnum, ConsumableTypeEnum } from "../../enum/goodsEnum";
import { BagItem, TankWeapon, Engine, Chassis, TankShield, SpecialTankPart, Consumable } from "./goodsInfo";

export const allItems:BagItem[]=[
    // 战车武器
    {
        id: 1001,
        name: "基础机关枪",
        tip: "基础的战车机关枪，适合新手使用",
        itemType: ItemTypeEnum.TankPart,
        tankPartType: TankPartTypeEnum.Weapon,
        weaponType: TankWeaponTypeEnum.MachineGun,
        weight: 50,
        durability: 100,
        maxDurability: 100,
        defense: 10,
        attackPower: 15,
        attackRange: 200,
        attackSpeed: 10,
        ammoType: "普通子弹",
        ammoCapacity: 50,
        maxAmmoCapacity: 50,
        rarity: "普通",
        price: 500,
        sellPrice: 250
    } as TankWeapon,
    
    {
        id: 1002,
        name: "火焰喷射器",
        tip: "喷射火焰攻击敌人，造成持续伤害",
        itemType: ItemTypeEnum.TankPart,
        tankPartType: TankPartTypeEnum.Weapon,
        weaponType: TankWeaponTypeEnum.Flamethrower,
        weight: 80,
        durability: 80,
        maxDurability: 80,
        defense: 15,
        attackPower: 25,
        attackRange: 150,
        attackSpeed: 8,
        ammoType: "燃料",
        ammoCapacity: 30,
        maxAmmoCapacity: 30,
        attributeType: WeaponAttributeTypeEnum.Fire,
        specialEffect: "燃烧效果",
        rarity: "稀有",
        price: 1500,
        sellPrice: 750
    } as TankWeapon,
    
    {
        id: 1003,
        name: "激光炮",
        tip: "发射高能量激光，精准打击敌人",
        itemType: ItemTypeEnum.TankPart,
        tankPartType: TankPartTypeEnum.Weapon,
        weaponType: TankWeaponTypeEnum.Laser,
        weight: 100,
        durability: 90,
        maxDurability: 90,
        defense: 20,
        attackPower: 40,
        attackRange: 350,
        attackSpeed: 3,
        ammoType: "能量电池",
        ammoCapacity: 15,
        maxAmmoCapacity: 15,
        attributeType: WeaponAttributeTypeEnum.Electric,
        specialEffect: "穿透效果",
        rarity: "史诗",
        price: 3000,
        sellPrice: 1500
    } as TankWeapon,
    
    // 引擎
    {
        id: 2001,
        name: "中型引擎",
        tip: "提供稳定的动力输出",
        itemType: ItemTypeEnum.TankPart,
        tankPartType: TankPartTypeEnum.Engine,
        engineType: EngineTypeEnum.Medium,
        weight: 70,
        durability: 120,
        maxDurability: 120,
        defense: 25,
        weightLimit: 500,
        maxSpeed: 100,
        acceleration: 8,
        rarity: "普通",
        price: 800,
        sellPrice: 400
    } as Engine,
    
    // 底盘
    {
        id: 3001,
        name: "中型底盘",
        tip: "基础的战车底盘，可安装多个部件",
        itemType: ItemTypeEnum.TankPart,
        tankPartType: TankPartTypeEnum.Chassis,
        chassisType: ChassisTypeEnum.Medium,
        weight: 100,
        durability: 150,
        maxDurability: 150,
        defense: 30,
        slotCount: 5,
        chassisIcon: "chassis_medium",
        rarity: "普通",
        price: 1200,
        sellPrice: 600
    } as Chassis,
    
    // 护盾
    {
        id: 4001,
        name: "能量护盾",
        tip: "提供额外的防护屏障",
        itemType: ItemTypeEnum.TankPart,
        tankPartType: TankPartTypeEnum.Shield,
        weight: 60,
        durability: 80,
        maxDurability: 80,
        defense: 40,
        shieldValue: 100,
        shieldRechargeRate: 5,
        cooldown: 10,
        rarity: "稀有",
        price: 2000,
        sellPrice: 1000
    } as TankShield,
    
    // 特殊部件
    {
        id: 5001,
        name: "能量回收器",
        tip: "战斗中缓慢恢复能量",
        itemType: ItemTypeEnum.TankPart,
        tankPartType: TankPartTypeEnum.Special,
        weight: 30,
        durability: 60,
        maxDurability: 60,
        defense: 5,
        specialAbility: "能量恢复",
        abilityValue: 2,
        rarity: "稀有",
        price: 1500,
        sellPrice: 750
    } as SpecialTankPart,
    
    // 消耗品
    {
        id: 6001,
        name: "装甲片",
        tip: "临时增加战车的防御值",
        itemType: ItemTypeEnum.Consumable,
        consumableType: ConsumableTypeEnum.Armor,
        effectValue: 50,
        targetType: "self",
        cooldown: 30,
        stackSize: 10,
        maxStackSize: 20,
        rarity: "普通",
        price: 100,
        sellPrice: 50
    } as Consumable,
    
    {
        id: 6002,
        name: "修理包",
        tip: "修复战车部件的耐久度",
        itemType: ItemTypeEnum.Consumable,
        consumableType: ConsumableTypeEnum.RepairKit,
        effectValue: 80,
        targetType: "tankPart",
        cooldown: 20,
        stackSize: 5,
        maxStackSize: 10,
        rarity: "普通",
        price: 150,
        sellPrice: 75
    } as Consumable
];
